const express = require("express");
const router = new express.Router();
const Entry_exam = require("../modles/entry_exam_schema")
const Mid_exam = require("../modles/mid_exam")
const End_exam = require("../modles/end_exam")
const Student_info = require("../modles/student_info_schema")

// router.get("/test", (req, res) => {
//     console.log("ok")
//     res.send("ok")
// })


router.get("/search_info", async (req, res) => {
    console.log(req.query)
    let info = {
        stu_info: await Student_info.findOne(req.query),
        entry_exam: await Entry_exam.findOne(req.query),
        mid_exam: await Mid_exam.findOne(req.query),
        end_exam: await End_exam.findOne(req.query),
    }

    console.log(info)
    res.send(info)
})















module.exports = router;